#include <bits/stdc++.h>

using namespace std;

#define int long long

void solve()
{
    int n; cin >> n;
    vector<int>v(n);
    for(auto &it : v) cin >> it;
    int diff = v[1] - v[0];
    bool bad = false;
    for(int i = 2;i < n;i ++) if(diff != v[i] - v[i - 1]) bad = true;
    if(bad)
    {
        cout << "No" << endl;
        return;
    }
    for(int i = 0;i < n;i ++)
    {
        v[i] = v[i] + (diff < 0 ? diff * (n - i) : -diff * (i + 1));
    }
    cout << (v[0] >= 0 && v[0] % (n + 1) == 0 ? "Yes" : "No") << endl;
}
signed main()
{
    int t; cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}
//n = 5
//21 18 15 12 9
//6 6 6 6 6
//20 16 12 8 4
//15 12 9 6 3
//6 6 6 6 6